﻿// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------
extern alias pcl;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PclWebUtility = pcl::System.Net.WebUtility;
using SystemWebUtility = System.Net.WebUtility;

namespace Portable.Net
{
    [TestClass]
    public class WebUtilityIntegrationTests
    {
        [TestMethod]
        public void HtmlEncode_EncodesSameCharactersAsPlatform()
        {
            for (char c = '\0'; c < ushort.MaxValue; c++)
            {
                string left = SystemWebUtility.HtmlEncode(c.ToString());

                string right = PclWebUtility.HtmlEncode(c.ToString());

                Assert.AreEqual(left, right);
            }
        }
    }
}
